package d01_satic;

import java.util.Random;

public class ItxiaoxunUtil {
    private ItxiaoxunUtil(){}//私有构造器，工具类不需要创建对象。
    //工具类
    public static String getCode( int n){
        String code="";
        String data="qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890";
        Random rand=new Random();
        for (int i = 0; i < n; i++) {
            int index=rand.nextInt(data.length());
            char c=data.charAt(index);
            code+=c;
        }
        return code;
    }
}
